BASE=$(HOME)/Tests/quantum-walk
CC=g++
CFLAGS=-Wall  -std=c++0x -g

ALPSINCDIR=/opt/alps/include/
ALPSLIBDIR=/opt/alps/lib

INCLS=-I$(BASE)/include -I$(ALPSINCDIR) 

TESTDIR=$(BASE)/test

SRC=coin.cpp shift.cpp state.cpp mediator.cpp density_matrix.cpp \
	simulation.cpp

LIBS=-Wl,-rpath,$(ALPSLIBDIR) -L$(ALPSLIBDIR) -lalps 
#/usr/lib/libhdf5_hl.so /usr/lib/libhdf5.so	

LIB_SRC=coin_test.cpp

all:
	@echo "compiling and linking.." 
	$(CC) $(CFLAGS) $(INCLS) -c $(SRC)


test1:	test1.cpp
	@echo "compiling and linking..."
	$(CC) $(CFLAGS) -o $(TESTDIR)/test1 $(SRC) test1.cpp $(INCLS) 

test2: test2.cpp
	@echo "compiling and linking..."
	$(CC) $(CFLAGS) -o $(TESTDIR)/test2 $(SRC) test2.cpp $(INCLS) 

test3: test3.cpp
	@echo "compiling and linking..."
	$(CC) $(CFLAGS) -o $(TESTDIR)/test3 $(SRC) test3.cpp $(INCLS) 

test4: test4.cpp
	@echo "compiling and linking..."
	$(CC) $(CFLAGS) -o $(TESTDIR)/test4 $(SRC) test4.cpp $(INCLS) $(LIBS)

test5: test5.cpp
	@echo "compiling and linking..."
	$(CC) $(CFLAGS) -o $(TESTDIR)/test5 $(SRC) test5.cpp $(INCLS) $(LIBS)

test_derived: test_derived.cpp
	@echo "compiling and linking..."
	$(CC) $(CFLAGS) -o $(TESTDIR)/test_derived  test_derived.cpp $(INCLS) 